package com.heatup.apt.common.constants;

import com.heatup.apt.common.util.StringUtil;

/**
 * 门店相关常量
 */
public class StoreConstants {


	/**
	 * 门店状态
	 */
	public enum StoreStatus {
		sys_create(1,"1","系统录入"),
		online(2,"2","已上线"),
		inserting_winding(3,"3","已下线"),
		deleted(4,"4","已删除");
		
		private int index;
		private String status;
		private String title;

		StoreStatus(int index,String status,String title){
			this.index = index;
			this.status = status;
			this.title = title;
	    }
		
		public static StoreStatus getStoreStatus(String status){
			if(StringUtil.isEmpty(status))
				return null;
			for(StoreStatus storeStatus : StoreStatus.values()){
				if(StringUtil.isEquals(storeStatus.getStatus(), status)){
					return storeStatus;
				}
			}
			return null;
		}

		public int getIndex() {
			return index;
		}
		public void setIndex(int index) {
			this.index = index;
		}
		public String getStatus() {
			return status;
		}
		public void setStatus(String status) {
			this.status = status;
		}
		public String getTitle() {
			return title;
		}
		public void setTitle(String title) {
			this.title = title;
		}
	}

	/**
	 * 门店类型
	 */
	
	public enum StoreType {
		CBD_store(1,"1","CBD店"),
		community_store(2,"2","社区店");
		
		private int index;
		private String type;
		private String title;

		StoreType(int index,String type,String title){
			this.index = index;
			this.type = type;
			this.title = title;
		}
		
		public static StoreType getStoreType(String type){
			if(StringUtil.isEmpty(type))
				return null;
			for(StoreType storeType : StoreType.values()){
				if(StringUtil.isEquals(storeType.getType(), type)){
					return storeType;
				}
			}
			return null;
		}

		public int getIndex() {
			return index;
		}

		public void setIndex(int index) {
			this.index = index;
		}

		public String getType() {
			return type;
		}

		public void setType(String type) {
			this.type = type;
		}

		public String getTitle() {
			return title;
		}

		public void setTitle(String title) {
			this.title = title;
		}
		
	}

	/**
	 *运营方式
	 */
	public enum StoreManageType {
		self_manage(1,"1","自营"),
		league_manage(2,"2","加盟");

		private int index;
		private String type;
		private String title;

		StoreManageType(int index,String type,String title){
			this.index = index;
			this.type = type;
			this.title = title;
		}

		public static StoreManageType getStoreManageType(String type){
			if(StringUtil.isEmpty(type))
				return null;
			for(StoreManageType storeManageType : StoreManageType.values()){
				if(StringUtil.isEquals(storeManageType.getType(), type)){
					return storeManageType;
				}
			}
			return null;
		}

		public int getIndex() {
			return index;
		}

		public void setIndex(int index) {
			this.index = index;
		}

		public String getType() {
			return type;
		}

		public void setType(String type) {
			this.type = type;
		}

		public String getTitle() {
			return title;
		}

		public void setTitle(String title) {
			this.title = title;
		}

	}
}
